home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / docs / howto / server-info / allspice.debug.txt < prev    next >
Encoding:
Text File  |  1992-12-14  |  7.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. How to Boot Allspice
  9.  
  10.      I am ``Allspice'', Sprite's root file server.  To  boot
  11. after a power-up try
  12.  
  13.     >b sd()new
  14.  
  15. to boot from disk.  If this hangs or doesn't work  for  some
  16. reason, you may have to do a network boot from ginger:
  17.  
  18.     >b ie(0,961c,43)sun4.md/new
  19.  
  20. If you get a ``phase error'' when booting off the disk,  you
  21. need  to reset the bus and try again.  To reset the bus, try
  22. booting from a non-existent disk, e.g.,
  23.  
  24.     >b sd(0,6)new
  25.  
  26. If you don't want allspice to be the root  server,  use  the
  27. -backup flag:
  28.  
  29.     >b ie(0,961c,43)sun4.md/new -backup
  30.  
  31. To reboot when running Sprite, use the shutdown command.
  32.  
  33.     % sync
  34.     % shutdown -R 'ie(0,961c,43)sun4.md/new
  35.  
  36. The ``sync'' command writes out the cache; it isn't required
  37. unless  you  are  paranoid.  Shutdown will sync the disks as
  38. the last thing before rebooting.
  39.  
  40.      If Allspice is too wedged to get things done with  user
  41. commands, then sync the disks with:
  42.  
  43.     break-W
  44.  
  45. This should print a message about queuing a call to sync the
  46. disks,  and  when  it  is done it should print a ``.'' and a
  47. newline.  If you don't get  the  newline  then  Allspice  is
  48. deadlocked inside the file system cache, sigh.
  49.  
  50.      (Note: on a regular Sun keyboard, this would  be  L1-W,
  51. and  you'd  use  the  L1 key like a shift key.  On a regular
  52. ASCII terminal, like Allspice's console, you use  the  break
  53. key like escape: break then N.)
  54.  
  55.      You can abort Allspice with:
  56.  
  57.     break-A
  58.  
  59. And then use the boot command described above.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. Debugging Tips
  75.  
  76.      The current procedure for an Allspice crash is to  take
  77. a core dump and then reboot.
  78.  
  79.      If Allspice acts up then you might  try  the  following
  80. things.   If  you  aren't logged in, log in as root.  Useful
  81. commands are:
  82.  
  83.     allspice # rpcstat -srvr
  84.  
  85. Which dumps out the status of all the RPC server  processes.
  86. If  a bunch are ``busy'', and they remain busy with the same
  87. RPC ID and client, then there may be a  deadlock.   If  they
  88. are  all  in the ``wait'' state it means that the Rpc_Daemon
  89. process is not doing rebinding for some reason.
  90.  
  91.     allspice # ps -a
  92.  
  93. This will tell you if any important daemons have  died.   In
  94. particular,  verify  that  arpd,  ipServer,  portmap, unfsd,
  95. inetd, tftpd, bootp, lpd, and sendmail are still around.  If
  96. the  ipServer  is in the DEBUG state you can kill it and the
  97. daemons       that       depend       on       it       with
  98. /hosts/allspice/restartIPServer.
  99.  
  100.     % rpcecho -h hostname -n 1000
  101.  
  102. This      program,       which       is       found       in
  103. /sprite/src/benchmarks/rpcecho,   and  may  or  may  not  be
  104. installed in /sprite/cmds, will tell you if  there  timeouts
  105. when using the RPC protocol to talk to another host.  If you
  106. suspect that a host with  an  Intel  ethernet  interface  is
  107. flaking  out,  you  can try this command.  Lot's of timeouts
  108. indicate trouble.  You can reset a host's network  interface
  109. from its console with
  110.  
  111.     break-N
  112.  
  113.  
  114.      If RPCs to Allspice are hanging but there's no  obvious
  115. sign  of  trouble, the problem might be that the timer queue
  116. is wedged.  To verify that this is the problem, type
  117.  
  118.     break-T
  119.  
  120. This will give the current time (as a number) and  the  time
  121. that  elements  of  the  timer queue are supposed to be pro-
  122. cessed, sorted by increasing time.   You  may  need  to  use
  123. ctrl-S  to  freeze  the display (use ctrl-Q to unfreeze it).
  124. If the current time is greater than the earliest element  in
  125. the timer queue, the timer is wedged and needs prodding.  To
  126. prod the timer, type
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.     break-A
  141.  
  142. to go to the PROM monitor, and then type ``c''  to  continue
  143. back  to  Sprite.   If  this fails to unwedge the timer, you
  144. should reboot.
  145.  
  146. Kernel Debugging
  147.  
  148.      If Allspice is so hung you can't explore with user com-
  149. mands, then the best you can do is sync the disks with:
  150.  
  151.     break-W
  152.  
  153. Then throw Allspice into the debugger with:
  154.  
  155.     break-D
  156.  
  157. If this drops you into the monitor (the '>' prompt), you can
  158. still  get  into  the debugger by typing 'c' to the monitor.
  159. You may have to do this twice.  You should eventually get  a
  160. message about ``Entering the debugger...''.
  161.  
  162.      You have to run the debugger from  shallot  or  another
  163. sun4  unix  machine,  unless  there  is a stand-alone Sprite
  164. machine  available.   To  login  to  shallot,  you  can  use
  165. ginger's console, next to you, on top of ginger.  You should
  166. verify that Allspice is accessible by running
  167.  
  168.     ginger% kmsg -v allspice
  169.  
  170. This should return the kernel version that Allspice is  run-
  171. ning.   If  this times-out then either Allspice isn't in the
  172. debugger, or more  likely,  no  one  is  responding  to  ARP
  173. requests  for  Allspice's  IP  address.   Run  the setup-arp
  174. script that is in ~sprite bin:
  175.  
  176.     ginger% setup-arp
  177.  
  178. Now rlogin to shallot and run the  Sprite  kernel  debugger.
  179. The     kernel     images     should     be     copied    to
  180. ginger:/home/ginger/sprite/kernels        (visible        as
  181. /home/ginger/sprite/kernels  on  shallot), and their version
  182. number should be evident in their name, e.g. sun4.1.065.  If
  183. not,  you  can run strings on the kernel images and grep for
  184. ``VERSION''.
  185.  
  186.     shallot% strings /tmp/sprite/sun4.sprite | egrep VERSION
  187.  
  188. To   run   the   kernel   debugger.    (kgdb.sun4   is    in
  189. ~sprite/cmds.sun4.)
  190.  
  191.     shallot% cd /home/ginger/sprite/kernels
  192.     shallot% Gdb sun4.version
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206. If the RPC system seems to be the problem, you can dump  the
  207. trace of recent RPCs by calling Rpc_PrintTrace(numRecs)
  208.  
  209.     (kgdb) print Rpc_PrintTrace(50)
  210.  
  211. If there is a deadlock you can dump the process table:
  212.  
  213.     (kgdb) print Proc_Dump()
  214.  
  215. or, if you want to look at only waiting processes:
  216.  
  217.     (kgdb) print Proc_KDump()
  218.  
  219. You can switch from process to process and  to  stack  back-
  220. traces by using the 'pid' command.  You only need to specify
  221. the last two hex digits of the process ID.  If you only have
  222. a  decimal  ID, then you have to type the whole thing.  File
  223. system deadlocks  center  around  locked  handles,  usually.
  224. When  you  find  a  process  stuck  in Fsutil_HandleFetch of
  225. Fsutil_HandleLock you can try to find the culprit by looking
  226. at the *hdrPtr these guys are waiting on.  There is a 'lock-
  227. ProcessID' in the hdrPtr that is really  the  address  of  a
  228. Proc_ControlBlock.   You  can  print this out with something
  229. like:
  230.  
  231.     (kgdb) print *(Proc_ControlBlock *)(hdrPtr->lockProcessID)
  232.  
  233. You can reboot Allspice from within  kgdb  with  the  reboot
  234. command.
  235.  
  236.     (kgdb) reboot ie(0,9634)sun4.md/new
  237.  
  238.  
  239. Taking a core dump
  240.  
  241.      Step 1) Make sure Allspice is in the debugger. If  not,
  242. put it in the debugger.
  243.  
  244.      Step 2) Login to ginger.  Go to a file system with > 40
  245. megabytes   free   space,   e.g.,   /home/ginger/cores  (now
  246. /export1/cores).
  247.  
  248.      Step     2.5)     You     might     need     to     run
  249. ~sprite/cmds.sun3/setup-arp  for  ginger  to be able to talk
  250. with allspice.
  251.  
  252.      Step      3)      Run      kgcore      as      follows:
  253. "~sprite/cmds.sun3/kgcore  -v  allspice"  The -v is optional
  254. but I like it because it  prints  progress  messages.   Note
  255. that this step can take several (~ 5) minutes.
  256.  
  257.      Step 4) Rename the  file  "vmcore"  so  something  more
  258. meaningful such as "mv vmcore vmcore.allspice.crash.11-21".
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.      Step 5) Reboot  allspice.   (~sprite/cmds.sun3/kmsg  -R
  273. "sd()new" allspice)
  274.  
  275. Modify date
  276.  
  277.      These notes were last updated by Mike Kupfer on January
  278. 28, 1992.
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.